package shuai.biz;

import shuai.util.OutOfStockException;

public class PhoneBizImplProxy implements PhoneBiz {

	//被代理的对象
	private PhoneBiz phoneBiz=new PhoneBizImpl();
	//日志对象
	private LogUtil logUtil=new LogUtil();
	public void buyPhone(int num) {
		phoneBiz.buyPhone(num);
		logUtil.log("购买", num);

	}

	public void salePhone(int num) throws OutOfStockException {
		phoneBiz.salePhone(num);
		logUtil.log("出售", num);

	}

}
